HTMLify
style.css
Views: 10 | Author: cody
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");
* {
margin: 0;
color: #eee;
font-family: "Poppins", sans-serif;
}
body {
height: 90vh;
background-color: #0e0e0e;
overflow-x: hidden;
}
.hero-section {
min-height: 100%;
padding: 2rem;
display: flex;
align-items: center;
justify-content: center;
}
.card-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 24px;
grid-row-gap: 24px;
width: 100%;
}
@media (max-width: 1000px) {
.card-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 620px) {
.card-grid {
grid-template-columns: repeat(1, 1fr);
}
}
.card {
list-style: none;
position: relative;
transition: all 0.2s ease-out;
}
.card__bg {
position: relative;
height: 50vh;
min-width: 250px;
border: 1px solid #acacac;
background-size: cover;
background-position: center center;
border-radius: 1rem;
overflow: hidden;
transform: scale(1);
transition: all 0.2s ease-out;
}
.card__bg::after {
content: "";
background-image: linear-gradient(360deg, black, transparent);
height: 150px;
bottom: 0;
width: 100%;
position: absolute;
}
.card__content {
position: absolute;
bottom: 1rem;
left: 1rem;
}
.card__category {
font-size: 10px;
text-transform: uppercase;
font-weight: bold;
color: #acacac;
}
.card:hover {
transform: scale(1.01);
filter: drop-shadow(0px 0px 80px #1d1d1d);
}
.card-grid:hover > .card:not(:hover).card {
filter: contrast(1.1) blur(5px);
}